#!/bin/bash

. $(dirname $0)/aux-funcs

ifconfig eth0 up  > /dev/null
dhclient eth0 > /dev/null 2>&1
ping       -c 3 -I eth0 $(get_gateway) 2>&1
#ping -l 8 -c 8 -I eth0 $(get_gateway) 2>&1

if [ $? -eq 0 ]; then
	echo "Eth0 Port OK"
	./gpio clear 423
else
	echo "Eth0 Port FAIL"
	exit 1
fi
